Imports Microsoft.VisualBasic

Namespace MyDAO
    Public Class MyEqualityCondition
        Inherits MyDataConditionBase

        Public Expression1 As MyDataExpressionBase
        Public op As MyEqualityOperator
        Public Expression2 As MyDataExpressionBase

        Public Sub New(ByVal exp1 As MyDataExpressionBase, ByVal exp2 As MyDataExpressionBase)
            Me.New(exp1, MyEqualityOperator.Equal, exp2)
        End Sub

        Public Sub New(ByVal exp1 As MyDataExpressionBase, ByVal op As MyEqualityOperator, ByVal exp2 As MyDataExpressionBase)
            Me.Expression1 = exp1
            Me.op = op
            Me.Expression2 = exp2
        End Sub

        Public Overrides Function ToString() As String
            Return String.Format("{0} {1} {2}", Me.Expression1, Me.op, Me.Expression2)            
        End Function

        '    Public Sub New(ByVal columnName As String, ByVal value As Object)
        '        Me.Expression1 = New MyColumnExpression(columnName)
        '        Me.op = MyDataOperator.Equal
        '        Me.Expression2 = New MyValueExpression(value)
        '    End Sub

        '    Public Sub New(ByVal columnName As String, ByVal variable As String)
        '        Me.Expression1 = New MyColumnExpression(columnName)
        '        Me.op = MyDataOperator.Equal
        '        Me.Expression2 = New MyVariableExpression(variable)
        '    End Sub
    End Class
End Namespace